package timo.rabbitmq.example.consumer.config;

import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author timo
 * @date 2022/7/12
 */
@Configuration
public class RabbitmqConfig {
    /**
     * 当创建RabbitMQ连接和信道后,Spring的RabbitMQ工具会自动在服务器中创建队列,
     * 代码在RabbitAdmin.declareQueues()方法中
     * @return
     */
    @Bean
    public Queue getQueue() {
        Queue q = new Queue("hello", true);
        return q;
    }
}
